﻿<phone:PhoneApplicationPage 
		x:Class="PCHenry.miFlashlight.MainPage"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
		xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
		mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
		FontFamily="{StaticResource PhoneFontFamilyNormal}"
		FontSize="{StaticResource PhoneFontSizeNormal}"
		Foreground="{StaticResource PhoneForegroundBrush}"
		SupportedOrientations="Portrait"
		shell:SystemTray.IsVisible="false" Loaded="PhoneApplicationPage_Loaded" Orientation="Portrait">
	<phone:PhoneApplicationPage.Resources>
	</phone:PhoneApplicationPage.Resources>

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="Transparent">
		<!--TitlePanel contains the name of the application and page title-->
		<!--
		<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
			<TextBlock x:Name="ApplicationTitle" Text="miFlashlight" Style="{StaticResource PhoneTextNormalStyle}"/>
		</StackPanel>
		-->
		<!--ContentPanel - place additional content here-->
		<Grid x:Name="ContentPanel" Grid.Row="1" Background="white" ManipulationDelta="Brightness_ManipulationDelta" ManipulationCompleted="Brightness_ManipulationCompleted" ManipulationStarted="Brightness_ManipulationStarted" d:IsLocked="True" Grid.RowSpan="3">
			<Grid.RowDefinitions>
				<RowDefinition Height="*"/>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>

			<Image x:Name="flashLight" Grid.Row="0" Source="Assets/miFlashlightWithName.png" HorizontalAlignment="Center" VerticalAlignment="Center"/>
			<TextBlock x:Name="PCHenryTextBlock" Grid.Row="1" Text="http://www.PCHenry.com" Foreground="{StaticResource PhoneAccentBrush}" TextAlignment="Right"/>
			<!--set this at design time so you know there's something there-->
			<!--this is used for adjusting the brightness-->
			<Canvas x:Name="Dimmer" Grid.Column="0" Height="800" Width="480" Background="black" Opacity=".25">
				<toolkit:GestureService.GestureListener>
					<toolkit:GestureListener
						DoubleTap="FlashlightDimmer_GestureListenerDoubleTap"/>
				</toolkit:GestureService.GestureListener>
			</Canvas>
		</Grid>
	</Grid>
	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar IsVisible="true" IsMenuEnabled="True" Opacity=".3" StateChanged="ApplicationBar_StateChanged">
			<shell:ApplicationBar.MenuItems>
				<shell:ApplicationBarMenuItem Text="Visit miFlashlight" Click="ApplicationBarVisitMiFlashlight_Click"/>
				<shell:ApplicationBarMenuItem Text="About" Click="ApplicationBarAbout_Click"/>
			</shell:ApplicationBar.MenuItems>
			<shell:ApplicationBarIconButton IconUri="/Assets/appbar.questionmark.rest.png" IsEnabled="True" Text="Help" Click="ApplicationBarHelp_Click"/>
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>